
#ifndef JELLY_SHARE_SRC_EMULE_KNOWN_FILE_H_
#define JELLY_SHARE_SRC_EMULE_KNOWN_FILE_H_

#include "src/utility/rule.h"
#include "src/type_define.h"


namespace jellyfish
{
    namespace io
    {
        class file;
    }

    namespace emule
    {
        class aich_hash_tree;
        class known_file
        {
        public:
            known_file();
            ~known_file();
            int32 create_from_file(const char* file_name);
            bool create_hash(io::file* fp, uint64 uSize, uint8* pucHash, aich_hash_tree* pShaHashOut);
        private:
            io::file* file_;
            aich_hash_tree* tree_;
            DISALLOW_COPY_AND_ASSIGN(known_file);
        };
    }
}


#endif  // JELLY_SHARE_SRC_EMULE_KNOWN_FILE_H_